﻿using System.Collections.Generic;
using Microsoft.Xna.Framework.Content;

namespace SpriteAtlasRuntime
{
    public class AnimationCollection
    {
        [ContentSerializer]
        public List<byte[]> Scripts = null;

        internal int Count
        {
            get { return Scripts.Count; }
        }

        internal byte[] this[int index]
        {
            get { return Scripts[index]; }
        }

        public void AllocScript(int index, ISpriteComponent animated, IModelComponent model)
        {
            Animator.RegisterScript(new AnimationScript(this, index, animated, model));
        }
    }
}
